/*
 * Copyright 2011-2012 by The Regents of the University of California Licensed
 * under the Apache License, Version 2.0 (the "License"); you may not use this
 * file except in compliance with the License. you may obtain a copy of the
 * License from
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package edu.ucsd.db.bassarisk.storage.loading;

import edu.ucsd.db.bassarisk.data.api.IValueType;
import edu.ucsd.db.bassarisk.data.api.IValueType.IValueReference;

/**
 * Serves as a base class for various CardLoader classes that bulk load
 * sequences of values into columns in the Bassarisk column store database.
 * 
 * Each different CardLoader implementation implements a different value type,
 * compression scheme combination.
 * 
 * @author nbales
 */
public interface ICardLoader<VT extends IValueType> {

  boolean appendBufferedValue(IValueReference<VT> value);

  boolean fileCard(DrawerLoader<VT> drawer);

  // For unit tests only please
  byte[] getCardBytes();

  void initialize();

  void reset(int cardEntryStart);

}
